Skip to content

Refactor Bevy_Picking to use MouseButton instead of PointerButton. - #25392

Closed
codecnotsupported wants to merge 12 commits into
bevyengine:mainfrom
codecnotsupported:main
Closed

Refactor Bevy_Picking to use MouseButton instead of PointerButton.#25392
codecnotsupported wants to merge 12 commits into
bevyengine:mainfrom
codecnotsupported:main

Conversation

@codecnotsupported

@codecnotsupported codecnotsupported commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Objective

A previous PR #24659 I changed fixed the Panning Plugin, but introduced a breaking change.
Upon further inspection but I didn't understand why Bevy_Picking used its own PointerButton instead of Bevy's MouseButton.
I figured I'd run into the reason if I refactored the code to use MouseButton. To no avail. As I still have no idea why PointerButton was used.

This PR fixes the breaking change & removes PointerButton as it seems redundant.

Solution

Replace PointerButton with MouseButton.

Testing

  • Did you test these changes? If so, how?
    cargo run -p ci -- test
    cargo run --example pan_camera_controller --features="pan_camera"
    Both ran successfully.
  • Are there any parts that need more testing?
    Not as far as I know.

Notes

Tell me if I need to redo the PR because of the merge commits or need to split up the commits more.

@alice-i-cecile alice-i-cecile added M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide A-Input Player input via keyboard, mouse, gamepad, and more C-Code-Quality A section of code that is hard to understand or change A-Picking Pointing at and selecting objects of all sorts labels Aug 13, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Input Aug 13, 2026
@alice-i-cecile

Copy link
Copy Markdown
Member

Yeah, as I look at this I have no idea why it's duplicated. Probably historical reasons of dependency trees. This needs a migration guide however :)

@alice-i-cecile alice-i-cecile added the S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged label Aug 13, 2026
@codecnotsupported
codecnotsupported marked this pull request as ready for review August 14, 2026 10:32
@codecnotsupported

Copy link
Copy Markdown
Contributor Author

Yeah, as I look at this I have no idea why it's duplicated. Probably historical reasons of dependency trees. This needs a migration guide however :)

Added the migration guide.
Tell me if anything looks off.

@codecnotsupported

Copy link
Copy Markdown
Contributor Author

Closed in favor of #25417

@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in Input Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Input Player input via keyboard, mouse, gamepad, and more A-Picking Pointing at and selecting objects of all sorts C-Code-Quality A section of code that is hard to understand or change M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants